Using Pthreads in Fortran
نویسنده
چکیده
This article describes the way to use pthreads library in Fortran programs. With most of the modern day processors having more and more built in capability of parallelism, there is ample need of utilizing this power at the application level, especially in scientific applications which involves lots of number crunching and multi GB disk handling. To utilize the power of multi threading for scientific applications, where FORTRAN still seems to be the de-facto choice, many compiler vendors like Intel have started supporting Open MP based parallelism. Though Open MP is a very good way of introducing parallelism in existing sequential FORTRAN programs, it only provides you with a mostly declarative style of programming where all the parallelization is handled at the compiler level. If you need to have explicit programming control by writing code (like handling disk based quantum chemical calculations, where explicit buffering is extremely useful), there is a need to use threading libraries like the pthread library. I will stick to using pthread in this article, but similar techniques can be used with any other threading library. I have also made the choice of using pthreads because it is widely available and recognized by POSIX standards. For detailed discussion on pthreads and programming with it refer the book from O'Reilly.
منابع مشابه
Application of Fortran Pthreads to Linear Algebra and Scientific Computing
Pthreads is a POSIX standard library for expressing concurrency on uniprocessor and symmetric multiprocessor computers. Typical multithreaded applications include database manipulation, operating systems, or any algorithm displaying task-level concurrency. These types of programs are generally coded in C. Hence, the POSIX standard only defines a C interface to Pthreads. The lack of a standard F...
متن کاملA Fortran 90 Application Programming Interface to the POSIX Threads Library
Pthreads is a POSIX standard established to control the spawning, execution, and termination of multiple threads within a single process. Because of a much lower system overhead, use of Pthreads is an attractive approach. Under this programming paradigm on a shared-memory system, threads execute concurrently within a single address space, although multiple processors may be employed to execute ...
متن کاملERDC MSRC/PET TR/00-32 Practical Experiences with the Fortran Pthreads API
With the growing popularity of symmetric multiprocessors (SMPs), shared-memory programming models have become more important. Of particular relevance to scienti c programmers will be those paradigms that can be used within message-passing codes. POSIX Threads (Pthreads) is one such shared-memory programming model. While only de ned for use within C programs, the Fortran API to Pthreads (FPTHRD)...
متن کاملTowards a Fortran 90 Interface to the POSIX Threads Library
Pthreads is a POSIX standard established to control the spawning, execution and termination of multiple threads within a single process. Because of a much lower overhead, use of Pthreads is an attractive approach. Under this programming paradigm on a shared-memory system, threads execute within a single address space, although multiple processors may be employed to execute the various threads. ...
متن کاملPerformance of Multicore LUP Decomposition
This paper evaluates the performance of four parallel LUP decomposition implementations. The implementations vary widely: two are implemented in Cilk++, but use different underlying algorithms to perform LUP decomposition; one written in Fortran; and the other is written in C++ with pthreads. This diversity allows us to evaluate which implementation techniques and properties are important to ac...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2004